package com.ruoyi.hqfinance.controller;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.domain.vo.TableVo;
import com.ruoyi.common.service.TableService;
import com.ruoyi.hqfinance.domain.HqEnterOperateFee;
import com.ruoyi.hqfinance.domain.HqExportInfo;
import com.ruoyi.hqfinance.domain.vo.HqEnterOperateFeeVo;
import com.ruoyi.hqfinance.domain.vo.HqExportInfoVo;
import com.ruoyi.hqfinance.service.HqEnterOperateFeeService;
import com.ruoyi.hqfinance.service.HqExportInfoService;
import com.ruoyi.logistic.domain.PageInfo;
import com.ruoyi.logistic.utils.TableUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/hq/exportInfo")
@Api(tags = "总部财务-总部下载")
public class HqExportInfoController {
    @Autowired
    private HqExportInfoService hqExportInfoService;
    @Autowired
    private TableService tableService;

    @ApiOperation("查询")
    @PostMapping("/search")
    public R collect(@RequestBody HqExportInfoVo vo){
        List<HqExportInfo> list = hqExportInfoService.search(vo);
        List<TableVo> fieldList = tableService.getFieldAnnotation(new HqExportInfo());
        return TableUtils.handleListResponse(list, fieldList, "暂无数据");
    }
}
